import time
from selenium import webdriver
from selenium.webdriver import ActionChains
class TestUI:
    def __init__(self):
        self.driver=webdriver.Chrome('C:/Program Files/Google/Chrome/Application/chromedriver.exe')
    def testReg(self):
        self.driver.get('http://localhost:8080/reg')
        self.driver.find_element_by_name('username').send_keys('gxw')
        time.sleep(2)
        self.driver.find_element_by_name('password').send_keys('123')
        self.driver.find_element_by_name('mobile').send_keys('18203622561')
        action=ActionChains(self.driver)
        ball=self.driver.find_element_by_class_name('dv_handler')
        action.click_and_hold(ball).perform()
        action.move_by_offset(280,0).perform()
        time.sleep(2)
        self.driver.find_element_by_class_name('van-button').click()
    def testLogin(self):
        pass
testui=TestUI()
testui.testReg()
